package com.playball.lottery.frm.set;

import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.playball.lottery.R;
import com.playball.lottery.ApplicationData;
import com.playball.lottery.base.BaseActivity;
import com.playball.lottery.customview.ShowCustomDialog;
import com.playball.lottery.util.SysApplication;


public class NewAboutActivity extends BaseActivity {
	private Button button_refres;
	private Button button_back;
	private TextView textView;
	private TextView call_phone;
	private TextView txtone;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.newaboutus);
		textView = (TextView) findViewById(R.id.top_title_info);
		textView.setText("关于我们");

		txtone = (TextView) findViewById(R.id.txtone);
		txtone.setText("版本:" + ApplicationData.APPVERSION);

		button_refres = (Button) findViewById(R.id.top_title_refres);
		button_refres.setVisibility(View.GONE);
		button_back = (Button) findViewById(R.id.top_title_back);
		button_back.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				finish();
			}
		});
		call_phone = (TextView) findViewById(R.id.callphone);
		call_phone.setText(Html.fromHtml("<a href='#'>18674849832\n18674899170</a>"));
//		call_phone.setOnClickListener(new OnClickListener() {
//
//			@Override
//			public void onClick(View v) {
//				// 弹出对话框
//				ShowCustomDialog.Builder alertbBuilder = new ShowCustomDialog.Builder(NewAboutActivity.this);
//				alertbBuilder.setTitle("联系客服");
//				alertbBuilder.setMessage("是否拨打：0731-84455633？");
//				alertbBuilder.setNegativeButton("拨打", new DialogInterface.OnClickListener() {
//					@Override
//					public void onClick(DialogInterface dialog, int which) {
//						Intent phoneIntent = new Intent("android.intent.action.CALL", Uri.parse("tel:"
//								+ "0731-84455633"));
//						startActivity(phoneIntent);
//						dialog.dismiss();
//					}
//				}).setPositiveButton("取消", new DialogInterface.OnClickListener() {
//					@Override
//					public void onClick(DialogInterface dialog, int which) {
//						dialog.dismiss();
//					}
//				}).createCustomDialog().show();
//
//			}
//		});

	}

	public void onResume() {
		super.onResume();
		
	}

	public void onPause() {
		super.onPause();
		
	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub
		super.finish();
		SysApplication.getInstance().removeActivity(this);
	};
}
